Skip to content

424 bridge priceaggregator prices#426

Merged
a17 merged 70 commits into
mainfrom
424-bridge-priceaggregator-prices
Dec 15, 2025
Merged

424 bridge priceaggregator prices#426
a17 merged 70 commits into
mainfrom
424-bridge-priceaggregator-prices

Conversation

@omriss
Copy link
Copy Markdown
Collaborator

@omriss omriss commented Nov 3, 2025

  • pause bridge
  • Price Oracles
    • Deploy PriceAggregatorOApp on sonic
    • Deploy BridgedPriceOracle on plasma
    • Setup both oapp
    • Send test price
    • Reproduce error with too-low gas, call lzReceive manually
    • Verify implementations
  • Bridged STBL
    • Deploy TokenOFTAdapter on Sonic
    • Deploy BridgedToken on Plasma
    • Setup both oapp
    • Deploy BridgedToken 1.0.1 on Plasma
    • Deploy Revenue Router on Plasma
    • Upgrade platform
    • Rename BridgedToken
    • Test how the bridges work
    • Verify implementations
  • xTokenBridge
    • Add upgrade tests for all tokens
    • Deploy xToken on plasma
    • Deploy xStaking on plasma
    • Deploy DAO on plasma
    • Deploy xTokenBridge on sonic
    • Deploy xTokenBridge on plasma
    • Setup xTokenBridge on both platforms: call xToken.setBridge, xTokenBridge.setXTokenBridge
    • Test how xToken-bridges work
    • Deploy 1.0.1 with buildOptions function: xTokenBridge, TokenBridge, TokenOFTAdapter
    • Upgrade platform with 1.0.1
    • Set up Revenue router on plasma: set xToken, xStaking
  • Upgrade tokens on Sonic
    • Deploy XToken, XStaking, DAO, Revenue Router
    • Upgrade platform on Sonic
  • Create RecoveryRelayer for other chains (stub)
    • Deploy RecoveryRelayer on plasma
    • Set Recovery and DAO in platform on plasma
    • Upgrade Platform on plasma

@omriss omriss linked an issue Nov 3, 2025 that may be closed by this pull request
Comment thread src/periphery/PriceAggregatorOApp.sol Fixed
Comment thread src/tokenomics/BridgedToken.sol Fixed
Comment thread src/tokenomics/TokenOFTAdapter.sol Fixed
@codecov
Copy link
Copy Markdown

codecov Bot commented Nov 3, 2025

Codecov Report

❌ Patch coverage is 99.29577% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 95.91%. Comparing base (5d2890b) to head (3574899).
⚠️ Report is 72 commits behind head on main.

Files with missing lines Patch % Lines
src/tokenomics/RevenueRouter.sol 94.73% 1 Missing and 1 partial ⚠️
src/tokenomics/XStaking.sol 96.77% 0 Missing and 1 partial ⚠️
src/tokenomics/XToken.sol 98.57% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #426      +/-   ##
==========================================
+ Coverage   95.79%   95.91%   +0.11%     
==========================================
  Files         162      172      +10     
  Lines       14533    14949     +416     
  Branches     1364     1401      +37     
==========================================
+ Hits        13922    14338     +416     
  Misses        498      498              
  Partials      113      113              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@omriss omriss linked an issue Nov 4, 2025 that may be closed by this pull request
@omriss omriss marked this pull request as ready for review November 4, 2025 07:10
Comment on lines +101 to +109
function _credit(
address to_,
uint amountLD_,
uint32 srcEid_
) internal virtual override returns (uint amountReceivedLD) {
_requireNotPaused(to_);

return super._credit(to_, amountLD_, srcEid_);
}

Check warning

Code scanning / Slither

Dead-code Warning

BridgedToken._credit(address,uint256,uint32) is never used and should be removed
Comment thread src/tokenomics/TokenOFTAdapter.sol Fixed
omriss added 2 commits December 4, 2025 21:23
…ter => TokenOFTAdapter, STBL => token/main-token. ABI is changed accordingly in some places. IPlatform is not changed
Comment thread src/test/MockXToken.sol Fixed
Comment thread src/test/MockXToken.sol Fixed
Comment thread src/test/MockXToken.sol Fixed
Comment thread src/tokenomics/DAO.sol Fixed
Comment thread src/tokenomics/DAO.sol Fixed
Comment on lines +93 to +101
function _credit(
address to_,
uint amountLD_,
uint32 srcEid_
) internal virtual override returns (uint amountReceivedLD) {
_requireNotPaused(to_);

return super._credit(to_, amountLD_, srcEid_);
}

Check warning

Code scanning / Slither

Dead-code Warning

TokenOFTAdapter._credit(address,uint256,uint32) is never used and should be removed
0x7331a1638fe957f8dc3395f52254374f52b3cbbdf185d4405a764a49dfb7f400;

/// @notice LayerZero v2 Endpoint address
address public immutable LZ_ENDPOINT;

Check warning

Code scanning / Slither

Conformance to Solidity naming conventions Warning

Variable XTokenBridge.LZ_ENDPOINT is not in mixedCase
Comment thread src/test/MockXToken.sol Fixed
Comment thread src/tokenomics/DAO.sol
Comment on lines +194 to +212
function updateOtherChainsPowers(address[] memory users, uint[] memory powers) external {
DaoStorage storage $ = _getDaoStorage();
require($.otherChainsPowersWhitelist[msg.sender], NotOtherChainsPowersWhitelisted());

uint len = users.length;
require(len == powers.length, IControllable.IncorrectArrayLength());

uint epoch = block.timestamp;
require(epoch > $.otherChainsEpoch, WrongValue()); // just for safety forbid double update in the same block
$.otherChainsEpoch = epoch;

OtherChainsPowers storage poc = $.otherChainsPowers[epoch];

for (uint i; i < len; ++i) {
poc.powers.set(users[i], powers[i]);
}

emit PowersOtherChainsUpdated(block.timestamp);
}
/* Initializers */
/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/

constructor(address lzEndpoint_) {

Check notice

Code scanning / Slither

Missing zero address validation Low

Comment thread src/test/MockXToken.sol
address internal immutable _token;
uint internal immutable _amountToSend;

constructor(address token_, uint amountToSend) {

Check notice

Code scanning / Slither

Missing zero address validation Low test

Comment thread src/test/MockXToken.sol
contract MockXToken {
using SafeERC20 for IERC20;

address internal _token;

Check warning

Code scanning / Slither

State variables that could be declared immutable Warning test

MockXToken._token should be immutable
Comment thread src/test/MockXToken.sol
using SafeERC20 for IERC20;

address internal _token;
uint internal _amountToSend;

Check warning

Code scanning / Slither

State variables that could be declared immutable Warning test

MockXToken._amountToSend should be immutable
function buildOptions(
uint128 gasLzReceive_,
uint128 valueLzReceive_,
uint16 _indexLzCompose,

Check warning

Code scanning / Slither

Conformance to Solidity naming conventions Warning

@a17 a17 merged commit 58a49a7 into main Dec 15, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🌉 Bridge PriceAggregator prices 🌉 Bridge STBL, xSTBL

3 participants